﻿@model IEnumerable<OnlineBookstore.Models.CapitalAdvanceOrder>
@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>账单查看 - 广软智慧书城</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        :root {
            --primary-color: #6c5ce7;
            --primary-dark: #5649c0;
            --text-color: #333;
            --border-color: #ddd;
            --light-bg: #f8f9fa;
            --radius: 6px;
            --shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            color: var(--text-color);
            background-color: #f5f7fa;
            line-height: 1.6;
        }

        /* 布局容器 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* 页眉样式 */
        .header {
            background-color: white;
            box-shadow: var(--shadow);
            padding: 15px 0;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            text-decoration: none;
        }

        .logout-link {
            color: #e74c3c;
            text-decoration: none;
            transition: all 0.3s ease;
        }

            .logout-link:hover {
                color: #c0392b;
                text-decoration: underline;
            }

        /* 主要内容区 */
        .main-content {
            padding: 30px 0;
        }

        .profile-container {
            background: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 30px;
            max-width: 800px;
            margin: 0 auto;
        }

        .page-title {
            font-size: 1.5rem;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--primary-color);
        }

        /* 表格样式 */
        .table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

            .table th,
            .table td {
                padding: 12px;
                text-align: left;
                border-bottom: 1px solid var(--border-color);
            }

            .table th {
                background-color: var(--light-bg);
                font-weight: 600;
            }

            .table tr:nth-child(even) {
                background-color: #f9f9f9;
            }

        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 20px;
            border-radius: var(--radius);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
            border: none;
        }

            .btn-primary:hover {
                background-color: var(--primary-dark);
                transform: translateY(-2px);
            }

        .btn-outline {
            background-color: transparent;
            color: var(--primary-color);
            border: 1px solid var(--primary-color);
        }

            .btn-outline:hover {
                background-color: rgba(108, 92, 231, 0.1);
            }

        .btn i {
            margin-right: 8px;
        }

        /* 页脚样式 */
        .footer {
            text-align: center;
            padding: 20px 0;
            margin-top: 40px;
            border-top: 1px solid var(--border-color);
            color: #666;
            font-size: 0.9rem;
        }

        /* 响应式调整 */
    </style>
</head>
<body>
    <!-- 页眉 -->
    <header class="header">
        <div class="container header-content">
            <a href="/" class="logo">
                <i class="fas fa-book"></i> 广软智慧书城
            </a>
            <div id="loginmsg">
                @Html.ActionLink("注销账户", "Cancellation", new { id = Session["Id"] }, new { @class = "logout-link" })
            </div>
        </div>
    </header>

    <!-- 主要内容区 -->
    <main class="main-content">
        <div class="container">
            <div class="profile-container">
                <h1 class="page-title">
                    <i class="fas fa-file-invoice-dollar"></i> 账单查看
                </h1>

                <table class="table">
                    <thead>
                        <tr>
                            <th>订单编号</th>
                            <th>书籍名称</th>
                            <th>订单价格</th>
                            <th>购买时间</th>
                            <th>账号余额</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model)
                        {
                            <tr>
                                <td>@Html.DisplayFor(modelItem => item.Code)</td>
                                <td>@Html.DisplayFor(modelItem => item.BookName)</td>
                                <td>@Html.DisplayFor(modelItem => item.PayAmount)</td>
                                <td>@Html.DisplayFor(modelItem => item.CreateTime)</td>
                                <td>@Html.DisplayFor(modelItem => item.Balance)</td>
                            </tr>
                        }
                    </tbody>
                </table>

                <div class="action-buttons">
                    <a href="@Url.Action("Actions", new { id = Session["Id"] })" class="btn btn-outline">
                        <i class="fas fa-arrow-left"></i> 返回
                    </a>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p>广软智慧书城 — MVC 项目 © @DateTime.Now.Year</p>
        </div>
    </footer>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</body>
</html>